package com.sy.convert;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageProperties;
import org.springframework.amqp.support.converter.MessageConversionException;
import org.springframework.amqp.support.converter.MessageConverter;

public class PDFMessageConverter implements MessageConverter {
    //设置转换为消息
    @Override
    public Message toMessage(Object object, MessageProperties messageProperties) throws MessageConversionException {
        throw new MessageConversionException("convert error");
    }

    //**设置转换为解析
    @Override
    public Object fromMessage(Message message) throws MessageConversionException {
        System.out.println(" pdf message");
        return null;
    }
}

